/**
 * cooke的设置
 */
// @ts-ignore
import Cookies from 'js-cookie'


const TOKEN_KEY='token';

const USER_TYE="usc"


//设置token

export const setToken=(token:String)=>{
    Cookies.set(TOKEN_KEY,token)
}

//获取token
export const getToken=()=>{

  let token=  Cookies.get(TOKEN_KEY);

  return token!=null ?token:undefined
}

//设置token

export const setUser=(token:number)=>{
    Cookies.set(USER_TYE,token)
}

//获取用户类型
export const getUser=()=>{

    let token=  Cookies.get(USER_TYE);

    return token!=null ?token:undefined
}




